define([], function(){
    var ndcols1 = [
        {name: 'id', display: 'id', width: 10, type: 'text', disabled: false},
        {name: 'cols1', display: '名称', width: 80, type: 'text', disabled: true},
        {name: 'cols2', display: '人员类型', width: 80, type: 'text', disabled: true},
        {name: 'cols3', display: '进度', width: 80, type: 'text', disabled: true}
    ];

    var ndcols2 = [
        {name: 'id', display: 'id', width: 10, type: 'text', disabled: false},
        {name: 'cols1', display: '收件人', width: 100, type: 'text', disabled: true},
        {name: 'cols2', display: '收件人电话', width: 100, type: 'text', disabled: true},
        {name: 'cols3', display: '收件人地址', width: 100, type: 'text', disabled: true},
        {name: 'cols4', display: '快递方式', width: 100, type: 'text', disabled: true},
        {name: 'cols5', display: '状态', width: 100, type: 'text', disabled: true},
        {name: 'cols6', display: '快递单号', width: 100, type: 'text', disabled: true},
        {name: 'cols7', display: '创建时间', width: 100, type: 'text', disabled: true}
    ];

    var ndcols3 = [
        {name: 'id', display: 'id', width: 10, type: 'text', disabled: false},
        {name: 'cols1', display: '附件类型', width: 100, type: 'text', disabled: true},
        {name: 'cols2', display: '附件', width: 100, type: 'text', disabled: true},
        {name: 'cols3', display: '上传人', width: 100, type: 'text', disabled: true},
        {name: 'cols4', display: '上传部门', width: 100, type: 'text', disabled: true},
        {name: 'cols5', display: '上传日期', width: 100, type: 'text', disabled: true}
    ];

    var ndcols4 = [
        {name: 'id', display: 'id', width: 10, type: 'text', disabled: false},
        {name: 'cols1', display: '通知方式', width: 100, type: 'text', disabled: true},
        {name: 'cols2', display: '通知内容', width: 100, type: 'text', disabled: true},
        {name: 'cols3', display: '日期', width: 100, type: 'text', disabled: true},
        {name: 'cols4', display: '操作人', width: 100, type: 'text', disabled: true},
        {name: 'cols5', display: '接收人', width: 100, type: 'text', disabled: true}
    ];


    var notification_detail = avalon.define({
        $id:"notification_detail",
        nddata1:"011605109034",
        nddata2:"[新西兰]个人签证",
        nddata3:"2016-05-11",
        nddata4:"李梦思",
        nddata5:"15011598052",
        nddata6:"1518383152@qq.com",
        nddata7:"待通知",
        nddata8:"待通知",
        nddata9:"待通知",
        
        expresscheck:{
            nddata10:'小江',
            nddata11:'18511460723',
            nddata12:'东直门南大街5号',
            nddata13:'',
            nddata14:'',
            nddata15:'',
            nddata16:'',
            nddata17:'',
            nddata18:''
        },
       

        showdia: function (id) {
            avalon.vmodels[id].toggle = true;
        },
        changeEmail:function(val){
            if(val==1){
                notification_detail.nddata7 = "已通知";
            }else if(val==2){
                notification_detail.nddata7 = "不通知";
            }
        },
        changeMess:function(val){
            if(val==1){
                notification_detail.nddata8 = "已通知";
            }else if(val==2){
                notification_detail.nddata8 = "不通知";
            }
        },
        changeTel:function(val){
            if(val==1){
                notification_detail.nddata9 = "已通知";
            }else if(val==2){
                notification_detail.nddata9 = "不通知";
            }
        },
        $ndeditopts:{
            width: 530,
            confirmText:"保存",
            cancelText:"关闭"
        },
        $ndperson_gropt:{
            title:"出行人信息",
            checkbox:false,
            singleSelect:true,
            editable:false,
            autoLoad:true,
            pagerbar:true,
            limit:5,
            bar:true,
            loadUrl: "../json/td.notification_detail_person.json",
            cols: ndcols1
        },
        $ndexpressrecord_gropt:{
            title:"快递记录",
            content:"<div><aoyou:button ms-click=\"showdia('ndedit')\">新增</aoyou:button>&nbsp;&nbsp;<aoyou:button ms-click=\"showdia('ndedit')\">编辑</aoyou:button>&nbsp;&nbsp;<aoyou:button>删除</aoyou:button></div>",
            checkbox:true,
            singleSelect:true,
            editable:false,
            autoLoad:true,
            pagerbar:true,
            limit:5,
            bar:true,
            loadUrl: "../json/td.notification_detail_cord.json",
            cols: ndcols2,
            _clickRow:function(){
                alert('1')
            }
        },
        $ndattachment_gropt:{
            title:"附件",
            checkbox:false,
            singleSelect:true,
            editable:false,
            autoLoad:true,
            pagerbar:true,
            limit:5,
            bar:true,
            loadUrl: "../json/td.notification_detail_attachment.json",
            cols: ndcols3
        },
        $ndlog_gropt:{
            title:"通知记录",
            checkbox:false,
            singleSelect:true,
            editable:false,
            autoLoad:true,
            pagerbar:true,
            limit:5,
            bar:true,
            loadUrl: "../json/td.notification_detail_log.json",
            cols: ndcols4
        },
        $ndexpress:{
            height:'150px',
            width:'161px',
            singleselect:true,
            sourceFlag:{value:"id",text:"name"},
            dataSource:[{name:'邮政EMS',id:1},{name:'顺丰快递',id:2},{name:'圆通快递',id:3},{name:'申通快递',id:4}]
        }
    });
    return notification_detail;



});
